package c.francis.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import c.francis.mapper.SubscriptionDtlMapper;
import c.francis.pojo.Subscription_dtl;
import c.francis.service.impl.SubscriptionDtlServiceImpl;

@Service
public class SubscriptionDtlService implements SubscriptionDtlServiceImpl {
	
	@Autowired
	private SubscriptionDtlMapper dtlMapper;
	
	public void insertnewsubdtl(int sid,int rid,Date sdate,Date edate,int residetype,double price) {
		dtlMapper.insertNewSubDtl(sid, rid, sdate, edate, residetype, price);
	}
	
	public void deleteSubdtlBySidRid(int id) {
		dtlMapper.deleteSubdtlBySidRid(id);
	}
	public Subscription_dtl queryById(int id) {
		return dtlMapper.queryById(id);
	}
	
	public List<Subscription_dtl> querySubdtlBySid(int sid){
		return dtlMapper.querySubdtlBySid(sid);
	}
}
